import service from './request';
import qs from 'qs';

/**
 * 获取类型列表
 * @param data
 * @returns {AxiosPromise}
 */
export const getAllTypeList = () => {
  return service({
    url: '/Video/public/index.php/video/Video/getAllTypeList',
    method: 'get',
  })
};

/**
 * 获取首页数据
 * @returns {AxiosPromise}
 */
export const getHomeAllVideoList = () => {
  return service({
    url: '/Video/public/index.php/video/Video/getHomeAllVideoList',
    method: 'get'
  })
};

/**
 * 根据类型ID获取电影
 * @param data
 * @returns {AxiosPromise}
 */
export const getTypeVideoByID = data => {
  return service({
    url: '/Video/public/index.php/video/Video/getTypeVideoByID',
    method: 'post',
    data
  })
};

/**
 * 根据名称模糊查询电影
 * @param data
 * @returns {AxiosPromise}
 */
export const getVideoByName = data => {
  return service({
    url: '/Video/public/index.php/video/Video/getVideoByName',
    method: 'post',
    data
  })
};

/**
 * 根据id获取电影详情
 * @param data
 * @returns {AxiosPromise}
 */
export const getVideoMsg = data => {
  return service({
    url: '/Video/public/index.php/video/Video/getVideoMsg',
    method: 'post',
    data
  })
};
